select top 5 in linq c#

67

linq query select top 1 c# -

imageName = (from soh in db.tblProductImages
             where soh.product_id == e.ProductId
             select soh.image_name).FirstOrDefault()

select top 5 in linq c# -

var list = (from t in ctn.Items
           where t.DeliverySelection == true && t.Delivery.SentForDelivery == null
           orderby t.Delivery.SubmissionDate
           select t).Take(5);

Comments

Submit
0 Comments